package com.tlgen.mapper;

import com.tlgen.domain.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface UserMapper {

    @Select("select * from t_user")
    public List<User> getAllUsers();

    @Insert("insert into t_user(name, age) values (#{name}, #{age})")
    void addUser(User user);
}
